package com.javabasic.oop;

public class Unit26Inheritance extends Book {
	public String firstName;
	
	public static void main(String [] args) {
		Library library = new Library();
		Book book = new Book();
		
		book.showAge();
		book.showAddress();
		book.showName();
		book.showNothing();
		book.showSomething();
		
		library.showAgeLibrary();
		library.showNothing();
	}
	
	@Override
	public void showSomething() {
		System.out.println("Show some thing in Unit26");
	}
	
	@Override
	public void showNothing() {
		System.out.println("Show nothing in Unit26");
	}
}

interface IDocument {
	public static final String NAME = "Eric";
	public static final int AGE = 25;
	
	public abstract void showName();
	public abstract void showAge();
}

interface IBook extends IDocument {
	public static final String ADDRESS = "64/4 Le Lieu";
	public static final int AGE = 30;
	
	public abstract void showAddress();
}

class Book implements IBook {
	protected static final String LAST_NAME = "Hoang";
	
	@Override
	public void showAddress() {
		System.out.println(ADDRESS);		
	}

	@Override
	public void showName() {
		System.out.println(NAME);
	}

	@Override
	public void showAge() {
		System.out.println(AGE);
	}
	
	protected void showNothing() {
		System.out.println("Show nothing " + NAME);
	}
	
	void showSomething() {
		System.out.println("Show something");
	}
	
	class Action {
		public void showAction() {
			
		}
	}

}

class Library extends Book implements IDocument, IBook {
	private int age = 35;
	public void showAgeLibrary() {
		System.out.println(age);
	}
	
	@Override
	public void showNothing() {
		System.out.println(LAST_NAME);
	}
}

